import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import axios from "axios";    // 1. 导入axios

// 2. 为每个请求地址前添加/api前缀，比如：http://localhost:8080/api/student---->http://localhost:9000/student
axios.defaults.baseURL = '/api'
// 3. 为每个vue实例都扩展一个属性叫$axios
Vue.prototype.$axios=axios

Vue.use(ElementUI);
Vue.config.productionTip = false


new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
